package com.spddr.pmos.repos;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.spddr.pmos.jpa.CustomerCredit;
import com.spddr.pmos.jpa.CustomerEvalId;

public interface CustomerCreditRepos extends JpaRepository<CustomerCredit, CustomerEvalId> {
	List<CustomerCredit> findByIdCustomer(long customer);

	@Query("DELETE FROM CustomerCredit WHERE id.customer=?")
	void deleteByCustomer(long customer);
}
